package com.swq.java.code.chapter12.code01;

class Outer {
    public class InnerTool {  //内部类
        public int add(int a, int b) {
            return a + b;
        }
    }

    private InnerTool tool = new InnerTool();

    public void add(int a, int b, int c) {
        tool.add(tool.add(a, b), c);
    }
}

public class Tester {
    public static void main(String args[]) {
        Outer o = new Outer();
        o.add(1, 2, 3);
        Outer.InnerTool tool = new Outer().new InnerTool();
        tool.add(1, 2);
    }
}